<?php

namespace IDock\Insurance\LIHI\Request;

use Exception;
use IDock\Insurance\LIHI\Request\AllLIHIRequest;
use IDock\Insurance\LIHI\Response\RenewalInquiryResponse;
use IDock\Visitor\RenewalInquiryVisitor;

class RenewalInquiryRequest extends AllLIHIRequest
{
    public $route = 'query/renewalQuery';

    protected $response = RenewalInquiryResponse::class;

    protected $urlTip = '续保查询';

    /*** @var  RenewalInquiryVisitor $visitor */
    protected $visitor;

    /**
     * @return array
     * @throws Exception
     */
    public function generate(): array
    {
        $param = [
            'engineNo' => $this->visitor->engineNo,
            'licenseNo' => $this->visitor->licenseNo,
            'vinNo' => $this->visitor->vin,
        ];
        return $param;
    }
}
